summaryrefslogtreecommitdiffabout
path: root/gammu/emb/common/device/irda/irda.c
Side-by-side diff
Diffstat (limited to 'gammu/emb/common/device/irda/irda.c') (more/less context) (show whitespace changes)
-rw-r--r--gammu/emb/common/device/irda/irda.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gammu/emb/common/device/irda/irda.c b/gammu/emb/common/device/irda/irda.c
index fef50ac..e680377 100644
--- a/gammu/emb/common/device/irda/irda.c
+++ b/gammu/emb/common/device/irda/irda.c
@@ -1,51 +1,55 @@
/* (c) 2001-2004 by Marcin Wiacek */
-/* based on some work from Ralf Thelen and MyGnokii */
-/* based on some work from Gnokii and MSDN */
+/* based on some work from Ralf Thelen and MyGnokii (www.mwiacek.com) */
+/* based on some work from MSDN */
+/* based on some work from Gnokii (www.gnokii.org)
+ * (C) 1999-2000 Hugh Blemings & Pavel Janik ml. (C) 2001-2004 Pawel Kot
+ * GNU GPL version 2 or later
+ */
/* You have to include wsock32.lib library to MS VC project to compile it */
#include "../../gsmstate.h"
#ifdef GSM_ENABLE_IRDADEVICE
#ifndef DJGPP
#ifndef WIN32
# include <stdlib.h>
# include <unistd.h>
# include <stdio.h>
# include <fcntl.h>
# include <errno.h>
# include <string.h>
# include <sys/time.h>
# include <sys/poll.h>
# include <sys/socket.h>
# include <sys/ioctl.h>
#else
# include <windows.h>
# include <io.h>
#endif
#include "../../gsmcomon.h"
#include "../devfunc.h"
#include "irda.h"
static bool irda_discover_device(GSM_StateMachine *state)
{
GSM_Device_IrdaData *d = &state->Device.Data.Irda;
struct irda_device_list *list;
unsigned char *buf;
unsigned int sec;
int s, z, len, fd, i;
GSM_DateTime Date;
bool founddevice = false;
#ifdef WIN32
int index;
#endif
fd = socket(AF_IRDA, SOCK_STREAM, 0);
/* can handle maximally 10 devices during discovering */
len = sizeof(struct irda_device_list) + sizeof(struct irda_device_info) * 10;
buf = malloc(len);
list = (struct irda_device_list *)buf;