On my system pcapsipdump svn trunk is creating the pcap filename with unprintable characters.
A ls -b (print octal escapes for nongraphic characters) shows the following, notice the the \250, \005, and \170. It appears this happens with all files.
20140905-125947-12013671300-(\250\005K)\177-100ad31045ded7021ebc88ab6c9eec52@209.220.119.17:5060.pcap
I'm not very good with C, but I looked through the source code and didn't notice anything obvious.
Interesting... ans what are "From" and "To" fields for this call?
I'm also seeing it for all files:
20150112-204344-12018362222-<#027Ɠ#036-9358d188-e247145d@10.100.102.2.pcap
It's just a standard:
From: Avi Bob Mar sip:1899@sip.fone.com;tag=fb23278c40bf1629o0
To: sip:12018362222@sip.fone.com
Hi - any update on this? I'm wondering if it's making cloudfuse go wonky...
i see bug here:
if (get_sip_peername(data,datalen,"To:",caller,sizeof(called))) {
get_sip_peername(data,datalen,"t:",caller,sizeof(called));
}
should be called, not caller:
if (get_sip_peername(data,datalen,"To:",called,sizeof(called))) {
get_sip_peername(data,datalen,"t:",called,sizeof(called));
}
Also, i hate uninitialized stings :) set those to empty string atleast. I would rather see an empty string instead of random characters that can't be displayed properly.
caller/called typo was fixed long time ago:
http://sourceforge.net/p/pcapsipdump/code/68/
and where do you see uninitialized strings may I ask?
Oops... Fixed for good now:
https://sourceforge.net/p/pcapsipdump/code/94/
I'm talking about these strings:
char caller[256];
char called[256];
char sip_method[256];
why not just initialize them to empty strings? For example char caller[256] = ""; Is there any reason not to do so? In case of bugs (like this one) they will be empty instead of pointers to who knows where.
Last edit: Ricardas 2015-09-09
Good point. Added in [r95], thanks!
Related
Commit: [r95]