- Adapted indenation to new agreed upon system
- Added support for second generation scriptcontext based counter
This commit is contained in:
62
intcli.c
62
intcli.c
@@ -43,41 +43,37 @@
|
||||
#include "network.h"
|
||||
#include "interrupt.h"
|
||||
|
||||
static mkChannel *pChannel = NULL;
|
||||
|
||||
static mkChannel *pChannel = NULL;
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
int ClientSetupInterrupt(char *host, int iPort)
|
||||
{
|
||||
pChannel = UDPConnect(host,iPort);
|
||||
if(pChannel == NULL)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
void ClientStopInterrupt(void)
|
||||
{
|
||||
if(pChannel)
|
||||
{
|
||||
NETClosePort(pChannel);
|
||||
free(pChannel);
|
||||
}
|
||||
int ClientSetupInterrupt(char *host, int iPort)
|
||||
{
|
||||
pChannel = UDPConnect(host, iPort);
|
||||
if (pChannel == NULL) {
|
||||
return 0;
|
||||
} else {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
void SendInterrupt(int iCode)
|
||||
{
|
||||
char pBueffel[132];
|
||||
|
||||
if( (iCode <0) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
sprintf(pBueffel,"SICSINT %d",iCode);
|
||||
UDPWrite(pChannel,pBueffel,strlen(pBueffel));
|
||||
void ClientStopInterrupt(void)
|
||||
{
|
||||
if (pChannel) {
|
||||
NETClosePort(pChannel);
|
||||
free(pChannel);
|
||||
}
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
void SendInterrupt(int iCode)
|
||||
{
|
||||
char pBueffel[132];
|
||||
|
||||
if ((iCode < 0)) {
|
||||
return;
|
||||
}
|
||||
|
||||
sprintf(pBueffel, "SICSINT %d", iCode);
|
||||
UDPWrite(pChannel, pBueffel, strlen(pBueffel));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user