netspool fixes

This commit is contained in:
Sergey Dorofeev
2012-02-04 22:56:07 +04:00
parent b5f3f48f0d
commit b1adc98f2d
11 changed files with 4525 additions and 4976 deletions
-22
View File
@@ -1,22 +0,0 @@
/* Do you want debug code to be compiled? */
#undef DEBUG
/* Do you want use DCD line control? */
#undef MODEM_WATCH_CARRIER
/* Do you want hangup to watch for modem DCD line? */
#undef MODEM_HANGUP_WATCH_CARRIER
/* Version string */
#undef RELEASE_VERSION
/* Disable passwords logging? */
#undef BFORCE_LOG_PASSWD
/* Path to the UUCP lock files directory */
#undef BFORCE_LOCK_DIR
/* Do you want use .csy locks? */
#undef BFORCE_USE_CSY
+3
View File
@@ -62,6 +62,9 @@
/* Do you want to use syslog? */
#undef USE_SYSLOG
/* Netspool */
#undef NETSPOOL
/* Do you want use .csy locks? */
#undef BFORCE_USE_CSY
+30 -3
View File
@@ -1,4 +1,18 @@
/*
* binkleyforce -- unix FTN mailer project
*
* Copyright (c) 1998-2000 Alexander Belkin, 2:5020/1398.11
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* $Id$
*/
#ifndef _NETSPOOL_H_
#define _NETSPOOL_H_
#define NS_NOTINIT (0)
#define NS_UNCONF (1)
@@ -6,15 +20,28 @@
#define NS_READY (3)
#define NS_RECEIVING (4)
#define NS_RECVFILE (5)
#define NS_CLOSED (6)
#define STRBUF (1024)
typedef struct {
int state;
char *error;
const char *error;
int socket;
int filename[STRBUF];
char filename[STRBUF];
unsigned long long length;
} s_netspool_state;
/* create socket and start session */
void netspool_start(s_netspool_state *state, const char *host, const char *port, const char *address, const char *password);
/* request for outbound */
void netspool_query(s_netspool_state *state, const char *what);
/* receive next file */
void netspool_receive(s_netspool_state *state);
/* read data */
int netspool_read(s_netspool_state *state, void *buf, int buflen);
/* acknowledge successful file transmission */
void netspool_acknowledge(s_netspool_state *state);
/* end session */
void netspool_end(s_netspool_state *state);
#endif
+1
View File
@@ -27,6 +27,7 @@
#define ACTION_UNLINK 0x001 /* Unlink file if send successful */
#define ACTION_TRUNCATE 0x002 /* Truncate file if send successful */
#define ACTION_FORCEUNLINK 0x004 /* Unlink file in any case after ses.*/
#define ACTION_ACKNOWLEDGE 0x008 /* Report success to netspool server */
#define TYPE_UNKNOWN 0x000
#define TYPE_NETMAIL 0x001