Re: gnokii smsd not giving me a clue as to why it is not sending and receiving sms'

helpFractal <[email protected]>
Newsgroups gmane.linux.drivers.gnokii
Message-ID <[email protected]>
I discovered that the 'PDU mode set' message is in 'atgen.c' so I added some
debug to find out where is was crashing and I think that the following line
in the 'AT_WriteSMS' function is causing a problem:

        memcpy(req2 + offset + 3, data->raw_sms->remote_number, tmp + 2);

I think that the problem is that 'offset' is -1 when drvinst->no_smsc = 1
(as set a little higher in the code)

	if (drvinst->no_smsc) {
		/* not even a length byte included */
		offset--;
	} else {
		memcpy(req2, data->raw_sms->message_center,
		            data->raw_sms->message_center[0] + 1);
		offset += data->raw_sms->message_center[0];
	}

My C is not good enough but if you do 'req2 + offset + 2' as an address into
'memcpy' when 'offset' is -1 is this valid?

-- 
View this message in context: http://old.nabble.com/gnokii-smsd-not-giving-me-a-clue-as-to-why-it-is-not-sending-and-receiving-sms%27-tp34856997p34864642.html
Sent from the gnokii-users mailing list archive at Nabble.com.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.