CtdlMakeTempFileName(tempfilename, sizeof tempfilename);
if (sock_puts(sock, "NDOP") < 0) return;
CtdlMakeTempFileName(tempfilename, sizeof tempfilename);
if (sock_puts(sock, "NDOP") < 0) return;
lprintf(CTDL_NOTICE, "Sent %ld octets to <%s>\n",
bytes_written, remote_nodename);
lprintf(CTDL_DEBUG, "<%s\n", buf);
lprintf(CTDL_NOTICE, "Sent %ld octets to <%s>\n",
bytes_written, remote_nodename);
lprintf(CTDL_DEBUG, "<%s\n", buf);
lprintf(CTDL_DEBUG, "Connected!\n");
/* Read the server greeting */
lprintf(CTDL_DEBUG, "Connected!\n");
/* Read the server greeting */
lprintf(CTDL_DEBUG, ">%s\n", buf);
/* Identify ourselves */
snprintf(buf, sizeof buf, "NETP %s|%s", config.c_nodename, secret);
lprintf(CTDL_DEBUG, "<%s\n", buf);
if (sock_puts(sock, buf) <0) goto bail;
lprintf(CTDL_DEBUG, ">%s\n", buf);
/* Identify ourselves */
snprintf(buf, sizeof buf, "NETP %s|%s", config.c_nodename, secret);
lprintf(CTDL_DEBUG, "<%s\n", buf);
if (sock_puts(sock, buf) <0) goto bail;
lprintf(CTDL_DEBUG, ">%s\n", buf);
if (buf[0] != '2') goto bail;
lprintf(CTDL_DEBUG, ">%s\n", buf);
if (buf[0] != '2') goto bail;