mirror of
https://github.com/servalproject/serval-dna.git
synced 2024-12-21 22:17:53 +00:00
Minor fixes to get Thomas' DT reception and intent broadcasting working.
This commit is contained in:
parent
83f88a6d08
commit
23b791bd0a
5
server.c
5
server.c
@ -197,6 +197,7 @@ int processRequest(unsigned char *packet,int len,
|
|||||||
break;
|
break;
|
||||||
case ACTION_DIGITALTELEGRAM:
|
case ACTION_DIGITALTELEGRAM:
|
||||||
// Unpack SMS message.
|
// Unpack SMS message.
|
||||||
|
if (debug>1) fprintf(stderr,"In ACTION_DIGITALTELEGRAM\n");
|
||||||
{
|
{
|
||||||
char emitterPhoneNumber[256];
|
char emitterPhoneNumber[256];
|
||||||
char message[256];
|
char message[256];
|
||||||
@ -217,8 +218,8 @@ int processRequest(unsigned char *packet,int len,
|
|||||||
// Send SMS to android
|
// Send SMS to android
|
||||||
char amCommand[576]; // 64 char + 2*256(max) char = 576
|
char amCommand[576]; // 64 char + 2*256(max) char = 576
|
||||||
sprintf(amCommand, "am broadcast -a org.servalproject.DT -e number \"%s\" -e content \"%s\"", emitterPhoneNumber, message);
|
sprintf(amCommand, "am broadcast -a org.servalproject.DT -e number \"%s\" -e content \"%s\"", emitterPhoneNumber, message);
|
||||||
int exitcode = printf(amCommand);
|
if (debug>1) fprintf(stderr,"Delivering DT message via intent: %s\n",amCommand);
|
||||||
//int exitcode = system(amCommand);
|
int exitcode = runCommand(amCommand);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ACTION_SET:
|
case ACTION_SET:
|
||||||
|
Loading…
Reference in New Issue
Block a user