-/* $Id$ */
+/*
+ * $Id$
+ *
+ * Perform data transfer between our Citadel server and another.
+ *
+ */
+
#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
#include <fcntl.h>
#include <string.h>
#include <errno.h>
+#include <limits.h>
#include "citadel.h"
#include "tools.h"
+#include "ipc.h"
/*
* This variable defines the amount of network spool data that may be carried
long atol(const char *);
-void attach_to_server(int argc, char **argv);
void serv_read(char *buf, int bytes);
void serv_write(char *buf, int nbytes);
void get_config(void);
{
long download_len;
long bytes_received;
- char buf[256];
+ char buf[SIZ];
static char pbuf[IGNET_PACKET_SIZE];
- char tempfilename[64];
+ char tempfilename[PATH_MAX];
long plen;
FILE *fp;
- sprintf(tempfilename, "/tmp/netpoll.%ld", (long) getpid());
+ strcpy(tempfilename, tmpnam(NULL));
serv_puts("NDOP");
serv_gets(buf);
printf("%s\n", buf);
*/
void transmit_spool(char *remote_nodename)
{
- char buf[256];
+ char buf[SIZ];
char pbuf[4096];
long plen;
long bytes_to_write, thisblock;
int main(int argc, char **argv)
{
- char buf[256];
+ char buf[SIZ];
char remote_nodename[32];
int a;
}
get_config();
- attach_to_server(argc, argv);
+ attach_to_server(argc, argv, NULL, NULL);
serv_gets(buf);
printf("%s\n", buf);
if ((buf[0] != '2') && (strncmp(buf, "551", 3))) {