version 1.42 | | version 1.43 |
---|
| | |
/* | | /* |
* static char *rcsid_init_c = | | * static char *rcsid_init_c = |
* "$Id: init.c,v 1.42 2005/12/05 23:34:04 akirschbaum Exp $"; | | * "$Id: init.c,v 1.43 2005/12/07 18:25:56 akirschbaum Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
* socket setup is handled elsewhere. We do send a version to the | | * socket setup is handled elsewhere. We do send a version to the |
* client. | | * client. |
*/ | | */ |
void InitConnection(NewSocket *ns, uint32 from) | | void InitConnection(NewSocket *ns, const char *from_ip) |
{ | | { |
SockList sl; | | SockList sl; |
unsigned char buf[256]; | | unsigned char buf[256]; |
| | |
ns->can_write=1; | | ns->can_write=1; |
| | |
ns->sent_scroll=0; | | ns->sent_scroll=0; |
sprintf((char*)buf,"%d.%d.%d.%d", | | ns->host=strdup_local(from_ip); |
(from>>24)&255, (from>>16)&255, (from>>8)&255, from&255); | | |
ns->host=strdup_local((char*)buf); | | |
sprintf((char*)buf, "version %d %d %s\n", VERSION_CS,VERSION_SC, VERSION_INFO); | | sprintf((char*)buf, "version %d %d %s\n", VERSION_CS,VERSION_SC, VERSION_INFO); |
sl.buf=buf; | | sl.buf=buf; |
sl.len=strlen((char*)buf); | | sl.len=strlen((char*)buf); |